#ifndef _UART_H_
#define _UART_H_
#include "TuYa_BLE.h"

#define  UART_LENGTH_TX	25	// 協議中最大的長度
#define  UART_LENGTH_RX	25	// 協議中最大的長度
typedef struct 
{
    unsigned char TxBuf[UART_LENGTH_TX];
    unsigned char RxBuf[UART_LENGTH_RX];
    unsigned char TxBufoffset;
    unsigned char RxBufoffset;
    unsigned char RxTimeOutCnt;
    unsigned char TxCycle;
    unsigned char TxLength;
    union {
		struct
		{
			unsigned char IsBusyTx : 1;  // R 有一筆原始ADC數據
			unsigned char IsRxSuccess : 1;  // R 有一筆原始ADC數據
		} b;
		unsigned char byte;
	} flag;
}DrvUartFormat_t;
extern volatile DrvUartFormat_t DrvUartFormat;

void fun_UART_Init();
void fun_UART_Tx_Data(unsigned char lengh);
#endif



